package springaop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringAop {
    public static void main(String[] args) {
        // pom.xml需要配置<dependency> <groupId> org.aspectj</groupId > <artifactId> aspectjweaver</artifactId > <version> 1.8.7</version > </dependency>
        ApplicationContext context = new ClassPathXmlApplicationContext("app.xml");
        Tank tank = (Tank) context.getBean("tanks");
//        TankProxy tankProxy = (TankProxy)context.getBean("tankproxy");
//
//        tankProxy.after();
        tank.move();
    }
}
